<SCRIPT LANGUAGE="JavaScript">
		<!--
		var setting = {
			data: {
				simpleData: {
					enable: true
				}
			}
		};

		var zNodes =[
			{ id:1, pId:0, name:"父节点1 - 展开", open:true},
			{ id:11, pId:1, name:"父节点11 - 折叠"},
			{ id:111, pId:11, name:"<a href='www.baid'>叶子节点111</a>"},
			{ id:112, pId:11, name:"叶子节点112"},
			{ id:113, pId:11, name:"叶子节点113"},
			{ id:114, pId:11, name:"叶子节点114"},
			{ id:12, pId:1, name:"父节点12 - 折叠"},
			{ id:121, pId:12, name:"叶子节点121"},
			{ id:122, pId:12, name:"叶子节点122"},
			{ id:123, pId:12, name:"叶子节点123"},
			{ id:124, pId:12, name:"叶子节点124"},
			{ id:13, pId:1, name:"父节点13 - 没有子节点", isParent:true},
			{ id:2, pId:0, name:"父节点2 - 折叠"},
			{ id:21, pId:2, name:"父节点21 - 展开", open:true},
			{ id:211, pId:21, name:"叶子节点211"},
			{ id:212, pId:21, name:"叶子节点212"},
			{ id:213, pId:21, name:"叶子节点213"},
			{ id:214, pId:21, name:"叶子节点214"},
			{ id:22, pId:2, name:"父节点22 - 折叠"},
			{ id:221, pId:22, name:"叶子节点221"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:223, pId:22, name:"叶子节点223"},
			{ id:224, pId:22, name:"叶子节点224"},
			{ id:23, pId:2, name:"父节点23 - 折叠"},
			{ id:231, pId:23, name:"叶子节点231"},
			{ id:232, pId:23, name:"叶子节点232"},
			{ id:233, pId:23, name:"叶子节点233"},
			{ id:234, pId:23, name:"叶子节点234"},
			{ id:3, pId:0, name:"父节点3 - 没有子节点", isParent:true},
			{ id:2, pId:0, name:"父节点2 - 展开", open:true},
			{ id:22, pId:2, name:"父节点22 - 折叠"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:223, pId:22, name:"叶子节点223"},
			{ id:224, pId:22, name:"叶子节点224"},
			{ id:22, pId:2, name:"父节点22 - 折叠"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:223, pId:22, name:"叶子节点223"},
			{ id:224, pId:22, name:"叶子节点224"},
			{ id:23, pId:2, name:"父节点23 - 没有子节点", isParent:true},
			{ id:2, pId:0, name:"父节点2 - 折叠"},
			{ id:22, pId:2, name:"父节点22 - 展开", open:true},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:223, pId:22, name:"叶子节点223"},
			{ id:224, pId:22, name:"叶子节点224"},
			{ id:22, pId:2, name:"父节点22 - 折叠"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:223, pId:22, name:"叶子节点223"},
			{ id:224, pId:22, name:"叶子节点224"},
			{ id:23, pId:2, name:"父节点23 - 折叠"},
			{ id:232, pId:23, name:"叶子节点232"},
			{ id:232, pId:23, name:"叶子节点232"},
			{ id:233, pId:23, name:"叶子节点233"},
			{ id:234, pId:23, name:"叶子节点234"},
			{ id:3, pId:0, name:"父节点3 - 没有子节点", isParent:true},
            { id:2, pId:0, name:"父节点2 - 展开", open:true},
			{ id:22, pId:2, name:"父节点22 - 折叠"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:223, pId:22, name:"叶子节点223"},
			{ id:224, pId:22, name:"叶子节点224"},
			{ id:22, pId:2, name:"父节点22 - 折叠"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:223, pId:22, name:"叶子节点223"},
			{ id:224, pId:22, name:"叶子节点224"},
			{ id:23, pId:2, name:"父节点23 - 没有子节点", isParent:true},
			{ id:2, pId:0, name:"父节点2 - 折叠"},
			{ id:22, pId:2, name:"父节点22 - 展开", open:true},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:223, pId:22, name:"叶子节点223"},
			{ id:224, pId:22, name:"叶子节点224"},
			{ id:22, pId:2, name:"父节点22 - 折叠"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:223, pId:22, name:"叶子节点223"},
			{ id:224, pId:22, name:"叶子节点224"},
			{ id:23, pId:2, name:"父节点23 - 折叠"},
			{ id:232, pId:23, name:"叶子节点232"},
			{ id:232, pId:23, name:"叶子节点232"},
			{ id:233, pId:23, name:"叶子节点233"},
			{ id:234, pId:23, name:"叶子节点234"},
			{ id:3, pId:0, name:"父节点3 - 没有子节点", isParent:true},
			{ id:3, pId:0, name:"父节点3 - 展开", open:true},
			{ id:33, pId:3, name:"父节点33 - 折叠"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:334, pId:33, name:"叶子节点334"},
			{ id:33, pId:3, name:"父节点33 - 折叠"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:334, pId:33, name:"叶子节点334"},
			{ id:33, pId:3, name:"父节点33 - 没有子节点", isParent:true},
			{ id:3, pId:0, name:"父节点3 - 折叠"},
			{ id:33, pId:3, name:"父节点33 - 展开", open:true},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:334, pId:33, name:"叶子节点334"},
			{ id:33, pId:3, name:"父节点33 - 折叠"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:334, pId:33, name:"叶子节点334"},
			{ id:33, pId:3, name:"父节点33 - 折叠"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:334, pId:33, name:"叶子节点334"},
			{ id:3, pId:0, name:"父节点3 - 没有子节点", isParent:true},
            { id:3, pId:0, name:"父节点3 - 展开", open:true},
			{ id:33, pId:3, name:"父节点33 - 折叠"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:334, pId:33, name:"叶子节点334"},
			{ id:33, pId:3, name:"父节点33 - 折叠"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:334, pId:33, name:"叶子节点334"},
			{ id:33, pId:3, name:"父节点33 - 没有子节点", isParent:true},
			{ id:3, pId:0, name:"父节点3 - 折叠"},
			{ id:33, pId:3, name:"父节点33 - 展开", open:true},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:334, pId:33, name:"叶子节点334"},
			{ id:33, pId:3, name:"父节点33 - 折叠"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:334, pId:33, name:"叶子节点334"},
			{ id:33, pId:3, name:"父节点33 - 折叠"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:333, pId:33, name:"叶子节点333"},
			{ id:334, pId:33, name:"叶子节点334"},
			{ id:3, pId:0, name:"父节点3 - 没有子节点", isParent:true},
			{ id:4, pId:0, name:"父节点4 - 展开", open:true},
			{ id:44, pId:4, name:"父节点44 - 折叠"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:44, pId:4, name:"父节点44 - 折叠"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:44, pId:4, name:"父节点44 - 没有子节点", isParent:true},
			{ id:4, pId:0, name:"父节点4 - 折叠"},
			{ id:44, pId:4, name:"父节点44 - 展开", open:true},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:44, pId:4, name:"父节点44 - 折叠"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:44, pId:4, name:"父节点44 - 折叠"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:4, pId:0, name:"父节点4 - 没有子节点", isParent:true},
            { id:4, pId:0, name:"父节点4 - 展开", open:true},
			{ id:44, pId:4, name:"父节点44 - 折叠"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:44, pId:4, name:"父节点44 - 折叠"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:44, pId:4, name:"父节点44 - 没有子节点", isParent:true},
			{ id:4, pId:0, name:"父节点4 - 折叠"},
			{ id:44, pId:4, name:"父节点44 - 展开", open:true},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:44, pId:4, name:"父节点44 - 折叠"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:44, pId:4, name:"父节点44 - 折叠"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:444, pId:44, name:"叶子节点444"},
			{ id:4, pId:0, name:"父节点4 - 没有子节点", isParent:true}
			
		];

		$(document).ready(function(){
			$.fn.zTree.init($("#treeDemo"), setting, zNodes);
		});
		//-->
	</SCRIPT>



<form id="pagerForm" method="post" action="/admin/department/">
    <input type="hidden" name="col" value=""><input type="hidden" name="pageNum" value="1" /><input type="hidden" name="keywords" value="${page.keywords}" /><input type="hidden" name="numPerPage" value="${page.numPerPage}" /><input type="hidden" name="orderField" value="${page.orderField}" />
</form><h2 class="contentTitle">部门信息</h2>

	<div class="zTreeDemoBackground left">
		
	</div>

<div layoutH="146" style="float:left; display:block; overflow:auto; width:240px; border:solid 1px #CCC; line-height:21px; background:#fff">
    <ul id="treeDemo" class="ztree"></ul>
	
</div>
<div class="page" style="width:740px;">
    <div class="pageHeader">
        <form action="/admin/department/" method="post" onsubmit="return navTabSearch(this)">
            <div class="searchBar">
                <ul class="searchContent">
                    <li>
                        <label>
                       		     关键字：
                        </label>
                        <select class="combox" name="col">
                            <select class="combox" name="col">
							<option value="">全部</option>
						    %for i in reversed(sorted(title)):							
							  <option value="${i}" 
							  %if i == page.col:
							    selected
						      %endif
					          >${title[i]}</option>					
					        %endfor							
						</select>

                    </li>
                    <li>
                        <input type="text" name="keywords" value="${page.keywords}" />
                    </li>
                </ul>
                <div class="subBar">
                    <ul>
                        <li>
                            <div class="buttonActive">
                                <div class="buttonContent">
                                    <button type="submit">
                                      	  检索
                                    </button>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </form>
    </div>
    <div class="pageContent">
        <div class="panelBar">
            <ul class="toolBar">
                <li>
                    <a class="add" href="/admin/department/add" target="dialog" rel="department_add" mask=true title="增加部门"><span>添加</span></a>
                </li>
				
				<li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids" href="/admin/department/delete/" class="delete"><span>批量删除</span></a></li>
				
                <li>
                    <a class="delete" href="/admin/department/delete/{dept_id}" target="navTabTodo" title="确定要删除吗?"><span>删除</span></a>
                </li>
                <li>
                    <a class="edit" href="/admin/department/edit/{dept_id}" target="dialog" rel="department_edit" mask=true title="修改部门" width="480"><span>修改</span></a>
                </li>
                <li class="line">line</li>
                <li>
                    <a class="icon" href="javascript:void(0);"><span>导入EXCEL</span></a>
                </li>
				<li><a class="icon" href="doc/dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导入EXCEL</span></a></li>
		
            </ul>
        </div>
        <table class="table" layouth="180">
            <thead>
                <tr>
                    <th width="50">
						<input type="checkbox" class="checkboxCtrl" group="ids" />
					</th>
					<th width="100">操作</th>
                    <th width="80">
                        ${title['dept_code']}
                    </th>
                    <th width="120">
                        ${title['dept_name']}
                    </th>
                    <th width="120">
                        ${title['levels']}
                    </th>
                    <th width="120">
                        ${title['is_active']}
                    </th>
                    <th width="120">
                        ${title['dept_notes']}
                    </th>
                </tr>
            </thead>
            <tbody>
                %for u in list:
                <tr target="dept_id" rel="${u.dept_id}">
                    <td><input name="ids" value="${u.dept_id}" type="checkbox"></td>
					<td>
						<a class="btnEdit" href="/admin/department/edit/${u.dept_id}" target="dialog" rel="dept_add"  mask=true title="修改"><span>修改</span></a>
						<a class="btnDel" href="/admin/department/delete/${u.dept_id}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a>
					</td>
                    <td>
                        ${u.dept_code}
                    </td>
                    <td>
                        ${u.dept_name}
                    </td>
                    <td>
                        ${u.levels}
                    </td>
                    <td>
                        ${u.is_active}
                    </td>
                    <td>
                        ${u.dept_notes}
                    </td>
                </tr>
                %endfor 
            </tbody>
        </table>
        <div class="panelBar">
            <div class="pages">
                <span>显示</span>
                <select class="combox" name="numPerPage" change="navTabPageBreak" param="numPerPage">
                    %for i in ['20','50','100','200']:
                    	<option value="${i}"
						%if  i == page.numPerPage: 
						    selected
						%endif
						>${i} </option>
                    %endfor
                </select>
                <span>共${page.totalCount}条</span>
            </div>
            <div class="pagination" targetType="navTab" totalCount="${page.totalCount}" numPerPage="${page.numPerPage}" pageNumShown="${page.pageNumShown}" currentPage="${page.currentPage}">
            </div>
        </div>
    </div>
</div>
